import React from 'react'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import City from '@/page/city'
import Home from '@/page/home'
import Search from '@/page/search'
import My from '@/page/my'
import Order from '@/page/order'
import ChangeCity from '@/page/changeCity'

class Router extends React.Component {
  render() {
    return (
      <BrowserRouter>
        <Switch>
          <Route path="/city" component={City} />
          <Route path="/changeCity/:id/" component={ChangeCity} />
          <Route path="/my" component={My} />
          <Route path="/order" component={Order} />
          <Route path="/search" component={Search} />
          <Route path="/" component={Home} />
        </Switch>
      </BrowserRouter>
    )
  }
}

export default Router

// /home /search /order /my  /my/order  /my/ticket  /my/vip  如果没有城市
// /city

// /   /city
